package principle.singleResponsibility;

public class SingleResponsibility2 {
    public static void main(String[] args) {
        new RoadVehicle().run("Car");
        new AirVehicle().run("Airplane");
    }
}

class RoadVehicle {
    public void run(String name) {
        System.out.println(name + " run on the road");
    }
}

class AirVehicle {
    public void run(String name) {
        System.out.println(name + " run in the air");
    }
}

class WaterVehicle {
    public void run(String name) {
        System.out.println(name + " run on the water");
    }
}
